package com.jeeplus.modules.web.service;

import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.web.entity.YjDistrict;
import com.jeeplus.modules.web.mapper.YjDistrictMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 十戒丶
 * @date 2021-01-26 22:35:09
 */
@Service
@Transactional(readOnly = true)
public class YjDistrictService extends CrudService<YjDistrictMapper, YjDistrict> {
    @Autowired
    private YjDistrictMapper yjDistrictMapper;
    
    public List<YjDistrict> getChildren(String parentId) {
        return yjDistrictMapper.getChildren(parentId);
    }
    
    public List<YjDistrict> getList() {
        return yjDistrictMapper.getList();
    }
    
    public YjDistrict getDistrict(String parentId) {
        return yjDistrictMapper.get(parentId);
    }
}
